package com.handyshop.mall.dubbo.user.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.handyshop.mall.dubbo.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

@ApiModel(value = "登录帐号表")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "nrs_user_account")
public class UserAccount extends BaseEntity {
    /**
     * 系统id
     */
    @TableField(value = "system_id")
    @ApiModelProperty(value = "系统id")
    private Long systemId;

    /**
     * 组织id
     */
    @TableField(value = "org_id")
    @ApiModelProperty(value = "组织id")
    private Long orgId;

    /**
     * 登录帐号
     */
    @TableField(value = "account")
    @ApiModelProperty(value = "登录帐号")
    private String account;

    /**
     * 登录密码
     */
    @TableField(value = "`password`")
    @ApiModelProperty(value = "登录密码")
    private String password;

    /**
     * 会员ID
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value = "会员ID")
    private Long userId;

    /**
     * 第三方唯一标识
     */
    @TableField(value = "third_id")
    @ApiModelProperty(value = "第三方唯一标识")
    private String thirdId;

    /**
     * 第三方平台唯一标识
     */
    @TableField(value = "unionid")
    @ApiModelProperty(value = "第三方平台唯一标识")
    private String unionid;

    /**
     * 来源
     */
    @TableField(value = "`source`")
    @ApiModelProperty(value = "来源")
    private String source;

    /**
     * 最后登录时间
     */
    @TableField(value = "last_time")
    @ApiModelProperty(value = "最后登录时间")
    private Date lastTime;

    /**
     * 状态(0:启用,1:禁用)
     */
    @TableField(value = "`status`")
    @ApiModelProperty(value = "状态(0:启用,1:禁用)")
    private Byte status;

    /**
     * 密码错误时间
     */
    @TableField(value = "err_time")
    @ApiModelProperty(value = "密码错误时间")
    private Date errTime;

    /**
     * 密码错误次数
     */
    @TableField(value = "err_count")
    @ApiModelProperty(value = "密码错误次数")
    private Integer errCount;

    public static final String COL_ID = "id";

    public static final String COL_SYSTEM_ID = "system_id";

    public static final String COL_ORG_ID = "org_id";

    public static final String COL_ACCOUNT = "account";

    public static final String COL_PASSWORD = "password";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_THIRD_ID = "third_id";

    public static final String COL_UNIONID = "unionid";

    public static final String COL_SOURCE = "source";

    public static final String COL_LAST_TIME = "last_time";

    public static final String COL_STATUS = "status";

    public static final String COL_ERR_TIME = "err_time";

    public static final String COL_ERR_COUNT = "err_count";

    public static final String COL_DELETE_FLAG = "delete_flag";

    public static final String COL_CREATOR_ID = "creator_id";

    public static final String COL_CREATOR = "creator";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_MODIFY_TIME = "modify_time";
}